/*
 * @Description: 入口文件
 * @Version: 1.0
 * @Autor: zenghao
 * @Date: 2023-11-30 15:11:47
 * @LastEditors: zenghao
 * @LastEditTime: 2023-12-01 10:36:43
 */
import { createApp } from 'vue'
import { createPinia } from 'pinia'
import ArcoVue from '@arco-design/web-vue';
import '@arco-design/web-vue/dist/arco.css';
// 引入 Pinia 状态持久化插件
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
import '@/styles/normalize.css'
import '@/styles/style.css'
// 导入Unocss样式
import 'uno.css'

import { getConfig } from '@/config/index'
// console.log(getConfig('appCode'))
// console.log(getConfig('projectName'))
// console.log(import.meta.env.VITE_APP_ENV)

// highlight 的样式，依赖包，组件
import 'highlight.js/styles/atom-one-dark.css'
import 'highlight.js/lib/common'
import hljsVuePlugin from '@highlightjs/vue-plugin'

import App from './App.vue'
import router from './router'

import VueClipboards from 'vue-clipboard2'

//  https://github.com/ankurk91/vue-toast-notification
import ToastPlugin from 'vue-toast-notification';
import 'vue-toast-notification/dist/theme-bootstrap.css';

// import fs from 'fs-extra'
// import MessageBox from '@/message'
const app = createApp(App)

// app.config.globalProperties.$message = MessageBox8e

// 创建 Pinia 实例
const pinia = createPinia()
// 使用 Pinia 状态持久化插件
pinia.use(piniaPluginPersistedstate)
app.use(pinia)
app.use(router)
app.use(VueClipboards);
// 引入代码高亮，并进行全局注册
app.use(hljsVuePlugin)
// 提示框
app.use(ToastPlugin);
app.use(ArcoVue);
// app.use(fs);
app.mount('#app')
